<?php
include ("include.php");
$noidung = new class_noidung();
$langid = $HTTP_GET_VARS["langid"];
$catid = $HTTP_GET_VARS["catid"];
$subcatid = $HTTP_GET_VARS["subcatid"];
if($subcatid > 0){
	$id = $subcatid;
}else{
	$id = $catid;
}
if ($langid == ""){
	$langid = 0;
}

//Layout
$layout_file = $arr_layout[$langid][0];
include("html_layout.php");

//load form lien he
$str_content = loadHtml("../htmls/".$arr_form_lienhe[$langid][0],"");
$str_htm = ereg_replace("@noidung@", "$str_content", $str_htm);
$str_htm = ereg_replace("@bg_contact@", BG_CONTACTUS, $str_htm);
$str_htm = ereg_replace("@langid@", "$langid", $str_htm);

$str_content = $noidung->chitiet($id, $langid);
$str_htm = ereg_replace("@noidung@", "$str_content", $str_htm);

//Header Loading - CSS, Meta, Javascript ...
include("html_header.php");

//Body Loading - Date-Time, ...
include("html_body.php");	

//Menu include
include("html_menu.php");

//Modules include
include("modules.php");

print $str_htm;
?>